package zy.blue7.flowable.bpmn.listener;

import org.flowable.engine.ProcessEngine;
import org.flowable.engine.ProcessEngineLifecycleListener;

/**
 * 流程引擎生命周期监听器，会在流程引擎注册和销毁的时候触发
 * todo 需要注册，这里是在xml配置文件注册
 */
public class ProcessEngineLifecycleListenerImpl implements ProcessEngineLifecycleListener {
    /**
     * todo 监听流程引擎启动
     *
     * @param processEngine
     */
    @Override
    public void onProcessEngineBuilt(ProcessEngine processEngine) {
        System.out.println("构建了流程引擎：" + processEngine);
    }

    /**
     * 监听流程引擎 关闭
     *
     * @param processEngine
     */
    @Override
    public void onProcessEngineClosed(ProcessEngine processEngine) {
        System.out.println("关闭了流程引擎----" + processEngine);
    }
}
